<!-- 背景图缩放 -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景图缩放</title>
    <style>
        div {
            width: 500px;
            height: 300px;
            background-color: slategrey;

            background-image: url(../../Pictures/Desk1.jpg);
            background-repeat: no-repeat;

            /* background-size: contain; */
            /* background-size: cover; */

            background-size: 100%;
        }
    </style>
</head>
<body>
    <div>背景图缩放</div>
</body>
</html>